package com.x.mapper;

import com.x.pojo.Employee;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * ClassName: EmpMapper
 * Package: IntelliJ IDEA
 * Description:

 * Written by HanXu
 * Create 2024.09.09 21:27
 */
public interface empMapper {

    //根据员工姓名与工资查询员工信息
    List<Employee> queryEmp(@Param("name") String name, @Param("salary") Double salary);

    int update(@Param("employee") Employee employee, @Param("id") Integer empId);

    //根据id批量查询
    List<Employee> queryBatch(@Param("ids") List<Integer> ids);

    //根据id批量删除
    int deleteBatch(@Param("ids")List<Integer> ids);

    //批量添加
    int addBatch(@Param("list")List<Employee> employeeList);

    //批量修改
    int updateBatch(@Param("list")List<Employee> employeeList);
}
